Skip to content

feat: hook-managed status line install (opt-in flag, self-healing) + 0.11.0#5

Merged
Evgenii-Konev merged 1 commit into
mainfrom
feat/statusline-hook-managed
Jul 1, 2026
Merged

feat: hook-managed status line install (opt-in flag, self-healing) + 0.11.0#5
Evgenii-Konev merged 1 commit into
mainfrom
feat/statusline-hook-managed

Conversation

@Evgenii-Konev

Copy link
Copy Markdown
Member

What

Simplifies how the v0.10 status line gets installed. Instead of an LLM-driven command resolving paths and writing settings.local.json, enabling is now a one-flag opt-in and the SessionStart hook does the wiring — and keeps it correct across plugin updates.

Why

The old /projectstore:statusline on was chatty (the command reasoned through path resolution because $CLAUDE_PLUGIN_ROOT isn't available to command bash) and baked a version-specific absolute path (…/0.10.0/scripts/statusline.mjs) that silently breaks on the next plugin update. The hook has $CLAUDE_PLUGIN_ROOT and self-locates, so it re-derives the current path every session start.

Changes

  • scripts/lib.mjs — new syncStatusLine(cfg, projectDir): when projectstore.jsonstatusline.enabled=true, writes/refreshes .claude/settings.local.jsonstatusLine to node "<current-plugin>/scripts/statusline.mjs". Idempotent (writes only on change); never clobbers a foreign status line; bails on unparseable settings; removes only our own entry on disable; returns a status string, never throws.
  • hooks/session-start.mjs — calls syncStatusLine (guarded) after the config guard.
  • commands/statusline.mdon|off|status now only flips statusline.enabled in projectstore.json (approval-gated); warns on a foreign local status line. The hook owns settings.local.json.
  • scripts/statusline.mjs — "ours" marker tightened statusline.mjsscripts/statusline.mjs (don't skip/clobber a foreign script that merely ends in statusline.mjs).
  • README + roadmap; plugin.json / marketplace.json 0.10.00.11.0.

Review & tests

projectstore:code-reviewer verdict commit; both 🟡 findings fixed (broad sentinel → scripts/statusline.mjs; conservative foreign guard for command-less entries). 13/13 ad-hoc state-machine assertions pass (create / stale-rewrite / unquoted-requote / foreign-no-clobber / preserve-keys / disable-remove / corrupt-bail / no-flag / command-less), plus confirmed it still composes over the real oh-my-claudecode HUD.

Note for v0.10 status-line users: run /projectstore:statusline on once to adopt the managed (self-healing) wiring.

Maintainer: ekonev@smartandpoint.com

- SessionStart hook wires .claude/settings.local.json to the current plugin
  version's statusline.mjs when statusline.enabled=true in projectstore.json —
  re-derived each start, so the path self-heals across plugin updates
- /projectstore:statusline on|off|status simplified to flip the flag (no more
  LLM path resolution, no version-baked path to maintain by hand)
- syncStatusLine() in lib.mjs: idempotent, never clobbers a foreign statusLine
  (marker tightened to "scripts/statusline.mjs"), bails on unparseable settings,
  removes only our own entry on disable
- README + roadmap updated; bump plugin + marketplace to 0.11.0

Maintainer: ekonev@smartandpoint.com
@Evgenii-Konev Evgenii-Konev merged commit 44b2462 into main Jul 1, 2026
@Evgenii-Konev Evgenii-Konev deleted the feat/statusline-hook-managed branch July 1, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant